home *** CD-ROM | disk | FTP | other *** search
/ CD ROM Paradise Collection 4 / CD ROM Paradise Collection 4 1995 Nov.iso / wp / isamf411.zip / ISAMMAKE.DOC < prev    next >
Text File  |  1994-11-21  |  17KB  |  318 lines

  1. ISAMMAKE.DOC
  2. 11/21/94
  3.  
  4.  
  5. Program written by:
  6.                         Bruce Guthrie
  7.                         Room H-4885
  8.                         U.S. Dept of Commerce/ESA/OBA/BSISD
  9.                         Washington, D.C. 20230
  10.  
  11.                         (202) 482-3234
  12.  
  13. You may freely copy and re-distribute this program; however, the U.S.
  14. Department of Commerce neither guarantees nor assures compatibility of the
  15. program with all computer software or hardware.
  16.  
  17. Foreign users:  Please provide an Internet e-mail address in all correspondence
  18. or and just e-mail your problems to me at bgu@cu.nih.gov
  19.  
  20.  
  21. The ISAMMAKE.EXE program builds an ISAM data base that includes every word found
  22. in a particular set of files.  This program is used in conjunction with the
  23. ISAMFIND.EXE program which actually searches and displays the files.
  24.  
  25. Definition of "word":  Currently, the program defines a "word" as consisting
  26. only of letters of the alphabet.  Non-letters are treated as word delimiters.
  27. Words are a minimum of three characters in length (can be changed to be from
  28. 2 to 5) and a maximum of 10.
  29.  
  30.  
  31. Since ISAMMAKE.EXE and ISAMFIND.EXE are related and share some of the same
  32. options, there are some common features that are documented in the documentation
  33. for one of the routines and not the other.  In general, most of the shared
  34. documentation ends up in ISAMFIND.DOC since that's all that people need to
  35. search the documents.  Shared documentation is as follows:
  36.  
  37.         Features                        see ISAMFIND.DOC documentation
  38.         The ISAMFIND.INI file           see ISAMFIND.DOC documentation
  39.         Format statements               see ISAMFIND.DOC documentation
  40.         Quick demo                      see ISAMMAKE.DOC documentation
  41.  
  42. NOTE:  You will find you typically need *both* a control file and an
  43. initialization file (*.INI) to run this program.  This is because the input and
  44. output format statements (FI= and FO=) cannot be specified from the command line
  45. and can only be specified in the initialization file.
  46.  
  47.  
  48. Text files to be processed:
  49.  
  50. The program expects a control file to be passed in which tells it which files
  51. are to be processed.  That control file can be of any two types:
  52.  
  53. (1) /C=L:  This is a basic file listing with (optional) descriptions.  The file
  54. directory is expected to consist entirely of file names, comment lines, and
  55. description continuation lines.
  56.  
  57. The exact format for the file depends on any format statement found in your
  58. initialization file.  (See subsequent section a discussion of format
  59. statements.) The default format for ISAMMAKE is "%fname% %fdesc%".  For example:
  60.  
  61.         ISAMMAKE.DOC Documentation for the ISAMMAKE program
  62.         C:\AUTOEXEC.BAT My automatic execution batch file
  63.  
  64. The file description has to be the last parameter in the format.  You cannot
  65. have a file description followed by, say, the file date or time.  The file name
  66. can include a wildcarded request.  In the case of wildcards, the file
  67. description can begin with one or more exclusion requests in the form
  68. "/Xfilespec".  For example:
  69.  
  70.         ISAMMAKE.* /X*.EXE Process everything except the EXE files
  71.         \AUTO*.* /X*.EXE /X*.COM Some AUTOEXEC.BAT options
  72.  
  73. Comment lines are any lines beginning with any of the characters in the
  74. /SKIP=string parameter.  The default SKIP request is "/SKIP=;"; any line
  75. beginning with a semi-colon in skipped.
  76.  
  77. Description continuation lines begin with a particular character string and are
  78. used when the total file description doesn't fit conveniently on one line.  In a
  79. BBS package like TBBS, continuation lines begin with "!>".  You can define the
  80. continuation string using the /CONT=string specification.  There is no
  81. continuation specification by default.
  82.  
  83. (2) /C=F:  This is similar to /C=L except It can consist of a collection of
  84. directory file names.  This is known as a "FAR file" in TBBS parlance and is
  85. useful for collecting a variety of files together.  Each of the directory files
  86. themselves can be in /C=L format shown above.
  87.  
  88.  
  89.  
  90. Output files:
  91.  
  92. ISAMMAKE.EXE creates two output files.  The first is an ISAM format file.  The
  93. second is a text list of data sets in that file.
  94.  
  95. People using VBDos/Professional and, in theory, any other language product that
  96. supports ISAM files should be able to read the ISAM file.  If you'd like the
  97. data base structure for this file, contact Bruce Guthrie and I'll e-mail or fax
  98. it to you.  Note that a characteristic of an ISAM file is that the minimum file
  99. size is 64K and that size increases are made in 32K increments.
  100.  
  101. The first seven characters of these file names are set with the /Fcorename
  102. parameter and determined by the person who created the files using the ISAMMAKE
  103. command.
  104.  
  105. xxxxxxx.ISA:  Two ISAM data bases in one physical file.  One tells the program
  106. which files have been indexed and contains includes information about the size
  107. of the file and how many words were in it.  The second data base contains all
  108. words above the minimum length cut-off.  Note that the program resets the file
  109. attribute of the ISAM file to be read-only.  If you want to delete it, you have
  110. to use the DOS ATTRIB command to reset it to read-write (ATTRIB xxxxxxx.ISA -R).
  111.  
  112. xxxxxxxF.LST:  A text file which indicates which files have been indexed and is
  113. a basic dump of the first ISAM file.  Sample records are as follows:
  114.  
  115.    1 C:\VBDOS\ISAMDEMO.001                                94-11-05 20:59        50    10          Cat Story
  116.    2 C:\VBDOS\ISAMDEMO.002                                94-11-05 01:15        24     4          Dog Story
  117.    3 C:\VBDOS\ISAMDEMO.003                                94-11-05 01:16        56    10          House story
  118.    4 C:\VBDOS\ISAMFIND.DOC                                94-11-12 18:26     14272  1273          Miscellaneous documentation
  119.    5 C:\VBDOS\ISAMMAKE.DOC                                94-11-13 19:42     18902  1789          Miscellaneous documentation
  120.  
  121. The record lay-out is as follows:
  122.  
  123.        cols  1- 4 document number (records sorted by document name)
  124.              6-57 full document name
  125.             59-66 document creation date (in yy-mm-dd format)
  126.             68-72 document creation time (in hh:mm format)
  127.             74-82 size of the file in bytes
  128.             84-88 number of words in the document
  129.             90-97 file area (/AREA=whatever or from /C=F information)
  130.             99-on document name
  131.  
  132.  
  133. The ISAMFIND.INI file:
  134.  
  135. See ISAMFIND.DOC documentation.
  136.  
  137.  
  138. Format statements:
  139.  
  140. See ISAMFIND.DOC documentation.
  141.  
  142.  
  143. Quick demo:
  144.  
  145. Okay.  So you've got this program in your hot little hands and you want to see
  146. what it can do for you.  Easy enough.  There's a batch file ISAMDEMO.BAT that
  147. will build a data base for you and search it for something in it.  This demo
  148. presumes you have Vern Buerg's excellent LIST program somewhere in your path.
  149. (By default, ISAMFIND presumes you use my own totally free READ program to
  150. view text files but, it's more realistic to presume you have LIST instead.)  If
  151. you don't have LIST, you should edit the ISAMDEMO.BAT file and replace the
  152. "/VLIST" parameter with the name of the file viewer you have.
  153.  
  154. Run the batch file and, when prompted, key in "house" as the word you want to
  155. see.  The program will display a list of file names which contain the word
  156. "house", listing the "best" documents first.
  157.  
  158.  
  159.  
  160. Syntax:
  161.  
  162.     ISAMMAKE /Fcorename /Cctlfile [ /C=L | /C=F ] [ /2 | /3 | /4 | /5 ]
  163.       [ /ACCEPT=string ] [ /AREA=string ] [ /CONT=string ] [ /STOP=string ]
  164.       [ /OVERWRITE | /-OVERWRITE | /APPEND | /UPDATE ] [ /SKIP=string ] [ /Td: ]
  165.       [ /Wn ] [ /PACK | /-PACK ] [ /Iinitfile | /-I ] [ /? | /?&H ]
  166.  
  167. where:
  168.  
  169. "/Fcorename" is the filename that will be used as the basis for all ISAM files
  170. that are created.  The core name should include a drive and path and up to seven
  171. characters of a file name without an extension.
  172.  
  173. "/Cctlfile" is the control card file.  See description above.
  174.  
  175. "/C=L" and "/C=F" specifies the function of the control card file.  See the
  176. discussion above.
  177.  
  178. "/2", "/3", "/4", and "/5" change the minimum word length.  Defaults to /3.
  179. Note that you should specify the same minimum word length when you invoke the
  180. ISAMFIND program too.
  181.  
  182. "/ACCEPT=string" allows you to specify characters *other than A to Z* that
  183. should be accepted as parts of words.  Foreign users, for example, might want to
  184. include some foreign characters.  The string can include hexadecimal codes.
  185.  
  186. "/AREA=string" specifies the area stamp that is to appear in the ultimate file.
  187. This can be set for the entire request.  If you're using /C=F and no /AREA is
  188. specified, the program will take the directory name itself to be the AREA
  189. description.
  190.  
  191. "/CONT=string" specifies that directory line descriptions can continue to
  192. multiple lines which begin with the given string.  In TBBS, "/CONT=!>" would be
  193. appropriate.  By default, no continuations are expected.  The string can
  194. include hexadecimal codes (which is especially necessary if you're using TBBS
  195. directory structures which require "/CONT=!>"--do this as "/CONT=!\062" instead.
  196.  
  197. "/STOP=string" specifies that the description is to stop with a given string.
  198. This is useful if the description includes some filler information at the end.
  199. The string can include hexadecimal codes.
  200.  
  201.  
  202. "/OVERWRITE" specifies that the output ISAM files are to be ignored and replaced
  203. if they exist already.
  204.  
  205. "/-OVERWRITE" specifies that the program should abort if the output ISAM files
  206. already exist.
  207.  
  208. "/APPEND" specifies that the program is to add any files it can find but it
  209. doesn't have to worry about handling unaccounted for files.  This is used if
  210. you're adding some directories that might already be in the data base.
  211.  
  212. "/UPDATE" specifies that the program is to add any files it can find.  If
  213. there's a pre-existing file in the database that isn't updated, the program will
  214. delete that file and all of its words.
  215.  
  216. "/SKIP=string" indicates that any DIR or FAR lines that begin with any of the
  217. characters in "string" should be skipped as being comments.  You can use
  218. hexadecimal codes if you need to.  You *must* use hexadecimal codes if you want
  219. to skip lines beginning with a space.  Blank lines are always ignored.  Defaults
  220. to "/SKIP=;".
  221.  
  222. "/Td:" specifies the drive to write any temporary ISAM files that the routine
  223. needs.  ISAM data bases are used to store and sort the file names and directory
  224. totals.  ISAM files cannot be created reliably on certain types of drives.  If a
  225. /Td: specification (e.g. "/TC:") is not specified, the routine checks each of
  226. the following drive specifications in order:
  227.   - the drive where the ISAM file is being written to (corename)
  228.   - the default drive
  229.   - drive C
  230. In each case, the program tries to skip the drive if it's either removeable or
  231. a remote (network) drive.  The latter test is often incorrect.  After that, it
  232. tries to create a file on the drive; CD-ROM drives always fail that test.
  233.  
  234. "/Wn" specifies the additional weighting that words in the title are to
  235. receive.  Title words don't count in the document count.  Initially defaults
  236. to "/W3".
  237.  
  238. "/PACK" compresses the ISAM file after creating this.  This is sometimes
  239. necessary because deleted ISAM records are tagged as "deleted" without actually
  240. being removed from the data base.  This becomes an issue if you use /UPDATE a
  241. lot.  Remember that ISAM files are created with an initial size allocation of
  242. 64K and expanded in 32K chunks after that so packing won't necessarily mean an
  243. actual reduction in the size of the file.
  244.  
  245. "/-PACK" skips the ISAM compression step.  This is initially the default.
  246.  
  247. "/Iinitfile" says to read an initialization file with the file name "initfile".
  248. The file specification *must* contain a period.  If no drive or path information
  249. is specified, the program will search for initfile beginning in your default
  250. subdirectory and then going throughout your DOS path.  The use of an
  251. initialization file is optional.  Initially defaults to "/IISAMFIND.INI".
  252.  
  253. "/-I" (or "/INULL") says to skip loading the initialization file.
  254.  
  255. "/?" or "/HELP" or "HELP" gives you the syntax of the command.
  256.  
  257. "/?&H" gives you a hexadecimal and decimal conversion table.
  258.  
  259.  
  260. Decimal and hexadecimal codes:
  261.   e.g. "\066\097\116" and "&H426174" both are "Bat"
  262. +---------------------------------------------------------------------------
  263. | dec  hex chr | dec  hex chr | dec  hex chr | dec  hex chr | dec  hex chr |
  264. +--------------+--------------+--------------+--------------+--------------+
  265. | \000 &H00 nul| \052 &H34 4  | \104 &H68 h  | \156 &H9C £  | \208 &HD0 ╨  |
  266. | \001 &H01   | \053 &H35 5  | \105 &H69 i  | \157 &H9D ¥  | \209 &HD1 ╤  |
  267. | \002 &H02   | \054 &H36 6  | \106 &H6A j  | \158 &H9E ₧  | \210 &HD2 ╥  |
  268. | \003 &H03   | \055 &H37 7  | \107 &H6B k  | \159 &H9F ƒ  | \211 &HD3 ╙  |
  269. | \004 &H04   | \056 &H38 8  | \108 &H6C l  | \160 &HA0 á  | \212 &HD4 ╘  |
  270. | \005 &H05   | \057 &H39 9  | \109 &H6D m  | \161 &HA1 í  | \213 &HD5 ╒  |
  271. | \006 &H06   | \058 &H3A :  | \110 &H6E n  | \162 &HA2 ó  | \214 &HD6 ╓  |
  272. | \007 &H07 bel| \059 &H3B ;  | \111 &H6F o  | \163 &HA3 ú  | \215 &HD7 ╫  |
  273. | \008 &H08 bs | \060 &H3C <  | \112 &H70 p  | \164 &HA4 ñ  | \216 &HD8 ╪  |
  274. | \009 &H09 tab| \061 &H3D =  | \113 &H71 q  | \165 &HA5 Ñ  | \217 &HD9 ┘  |
  275. | \010 &H0A lf | \062 &H3E >  | \114 &H72 r  | \166 &HA6 ª  | \218 &HDA ┌  |
  276. | \011 &H0B vt | \063 &H3F ?  | \115 &H73 s  | \167 &HA7 º  | \219 &HDB █  |
  277. | \012 &H0C pg | \064 &H40 @  | \116 &H74 t  | \168 &HA8 ¿  | \220 &HDC ▄  |
  278. | \013 &H0D cr | \065 &H41 A  | \117 &H75 u  | \169 &HA9 ⌐  | \221 &HDD ▌  |
  279. | \014 &H0E   | \066 &H42 B  | \118 &H76 v  | \170 &HAA ¬  | \222 &HDE ▐  |
  280. | \015 &H0F   | \067 &H43 C  | \119 &H77 w  | \171 &HAB ½  | \223 &HDF ▀  |
  281. | \016 &H10   | \068 &H44 D  | \120 &H78 x  | \172 &HAC ¼  | \224 &HE0 α  |
  282. | \017 &H11   | \069 &H45 E  | \121 &H79 y  | \173 &HAD ¡  | \225 &HE1 ß  |
  283. | \018 &H12   | \070 &H46 F  | \122 &H7A z  | \174 &HAE «  | \226 &HE2 Γ  |
  284. | \019 &H13   | \071 &H47 G  | \123 &H7B {  | \175 &HAF »  | \227 &HE3 π  |
  285. | \020 &H14   | \072 &H48 H  | \124 &H7C |  | \176 &HB0 ░  | \228 &HE4 Σ  |
  286. | \021 &H15   | \073 &H49 I  | \125 &H7D }  | \177 &HB1 ▒  | \229 &HE5 σ  |
  287. | \022 &H16   | \074 &H4A J  | \126 &H7E ~  | \178 &HB2 ▓  | \230 &HE6 µ  |
  288. | \023 &H17   | \075 &H4B K  | \127 &H7F   | \179 &HB3 │  | \231 &HE7 τ  |
  289. | \024 &H18   | \076 &H4C L  | \128 &H80 Ç  | \180 &HB4 ┤  | \232 &HE8 Φ  |
  290. | \025 &H19   | \077 &H4D M  | \129 &H81 ü  | \181 &HB5 ╡  | \233 &HE9 Θ  |
  291. | \026 &H1A eof| \078 &H4E N  | \130 &H82 é  | \182 &HB6 ╢  | \234 &HEA Ω  |
  292. | \027 &H1B esc| \079 &H4F O  | \131 &H83 â  | \183 &HB7 ╖  | \235 &HEB δ  |
  293. | \028 &H1C   | \080 &H50 P  | \132 &H84 ä  | \184 &HB8 ╕  | \236 &HEC ∞  |
  294. | \029 &H1D ???| \081 &H51 Q  | \133 &H85 à  | \185 &HB9 ╣  | \237 &HED φ  |
  295. | \030 &H1E ???| \082 &H52 R  | \134 &H86 å  | \186 &HBA ║  | \238 &HEE ε  |
  296. | \031 &H1F ???| \083 &H53 S  | \135 &H87 ç  | \187 &HBB ╗  | \239 &HEF ∩  |
  297. | \032 &H20    | \084 &H54 T  | \136 &H88 ê  | \188 &HBC ╝  | \240 &HF0 ≡  |
  298. | \033 &H21 !  | \085 &H55 U  | \137 &H89 ë  | \189 &HBD ╜  | \241 &HF1 ±  |
  299. | \034 &H22 "  | \086 &H56 V  | \138 &H8A è  | \190 &HBE ╛  | \242 &HF2 ≥  |
  300. | \035 &H23 #  | \087 &H57 W  | \139 &H8B ï  | \191 &HBF ┐  | \243 &HF3 ≤  |
  301. | \036 &H24 $  | \088 &H58 X  | \140 &H8C î  | \192 &HC0 └  | \244 &HF4 ⌠  |
  302. | \037 &H25 %  | \089 &H59 Y  | \141 &H8D ì  | \193 &HC1 ┴  | \245 &HF5 ⌡  |
  303. | \038 &H26 &  | \090 &H5A Z  | \142 &H8E Ä  | \194 &HC2 ┬  | \246 &HF6 ÷  |
  304. | \039 &H27 '  | \091 &H5B [  | \143 &H8F Å  | \195 &HC3 ├  | \247 &HF7 ≈  |
  305. | \040 &H28 (  | \092 &H5C \  | \144 &H90 É  | \196 &HC4 ─  | \248 &HF8 °  |
  306. | \041 &H29 )  | \093 &H5D ]  | \145 &H91 æ  | \197 &HC5 ┼  | \249 &HF9 ∙  |
  307. | \042 &H2A *  | \094 &H5E ^  | \146 &H92 Æ  | \198 &HC6 ╞  | \250 &HFA ·  |
  308. | \043 &H2B +  | \095 &H5F _  | \147 &H93 ô  | \199 &HC7 ╟  | \251 &HFB √  |
  309. | \044 &H2C ,  | \096 &H60 `  | \148 &H94 ö  | \200 &HC8 ╚  | \252 &HFC ⁿ  |
  310. | \045 &H2D -  | \097 &H61 a  | \149 &H95 ò  | \201 &HC9 ╔  | \253 &HFD ²  |
  311. | \046 &H2E .  | \098 &H62 b  | \150 &H96 û  | \202 &HCA ╩  | \254 &HFE ■  |
  312. | \047 &H2F /  | \099 &H63 c  | \151 &H97 ù  | \203 &HCB ╦  | \255 &HFF    |
  313. | \048 &H30 0  | \100 &H64 d  | \152 &H98 ÿ  | \204 &HCC ╠  |              |
  314. | \049 &H31 1  | \101 &H65 e  | \153 &H99 Ö  | \205 &HCD ═  |              |
  315. | \050 &H32 2  | \102 &H66 f  | \154 &H9A Ü  | \206 &HCE ╬  |              |
  316. | \051 &H33 3  | \103 &H67 g  | \155 &H9B ¢  | \207 &HCF ╧  |              |
  317. +--------------+--------------+--------------+--------------+--------------+
  318.